Skip to content

Improve memory ordering diagnostics#97389

Merged
bors merged 4 commits intorust-lang:masterfrom
m-ou-se:memory-ordering-diagnostics
Jun 27, 2022
Merged

Improve memory ordering diagnostics#97389
bors merged 4 commits intorust-lang:masterfrom
m-ou-se:memory-ordering-diagnostics

Conversation

@m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented May 25, 2022

Before:

image

After:

image


Before this change, the compiler suggests the failure ordering is too strong and suggests choosing a weaker ordering. After this change, it instead suggests the success ordering is not strong enough, and suggests chosing a stronger one. This is more likely to be correct.

Also, before this change, the compiler suggested downgrading an invalid AcqRel failure ordering to Relaxed, without mentioning Acquire as an option.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-concurrency Area: Concurrency A-diagnostics Area: Messages for errors, warnings, and lints A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix` D-papercut Diagnostics: An error or lint that needs small tweaks. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants